package cn.iocoder.yudao.module.book.controller.app.user;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.book.controller.app.user.vo.UserSettingDefaultsRespVO;
import cn.iocoder.yudao.module.book.service.user.UserSettingService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "用户 APP - 用户设置")
@RestController
@RequestMapping("/user/setting")
public class AppUserSettingController {

    @Resource
    private UserSettingService userSettingService;

    @GetMapping("/defaults")
    @Operation(summary = "获取用户默认设置")
    public CommonResult<UserSettingDefaultsRespVO> getUserSettingDefaults() {
        UserSettingDefaultsRespVO result = userSettingService.getUserSettingDefaults();
        return success(result);
    }
}